﻿using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp_PrismRegionBase.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow(IRegionManager regionManager)
        {
            InitializeComponent();

            //regionManager.RegisterViewWithRegion("viewRegion", "ViewA");
            //regionManager.RegisterViewWithRegion("viewRegion", "ViewB");
            //regionManager.RegisterViewWithRegion("viewRegion", "ViewC");


            this.Loaded += (send,e)=> 
            {
                //设置默认访问区域
                //var _region = regionManager.Regions["viewRegion"];
                //var _defatultView = _region.Views.FirstOrDefault(it => it.GetType().Name == "ViewB");
                //if (_defatultView != null) 
                //{
                //    _region.Activate(_defatultView);
                //}
            };
        }


    }
}
